/*
 * @Author: Wxx
 * @Date: 2022-02-22 10:47:23
 * @LastEditors: Wxx
 * @LastEditTime: 2022-02-25 14:16:32
 * @Description:
 */
import React, { Component } from "react";
import Swiper, { Navigation, Pagination } from "swiper";
import "swiper/css";
import "swiper/css/navigation";
import "swiper/css/pagination";
export default class MSwiper extends Component {
  componentDidMount() {
    new Swiper(".swiper", {
      modules: [Navigation, Pagination],
      pagination: {
        el: ".swiper-pagination",
      },
    });
  }
  render() {
    return (
      <div>
        <div className="swiper" style={{ overflow: "hidden" }}>
          <div className="swiper-wrapper">{this.props.children}</div>
          <div className="swiper-pagination"></div>
        </div>
      </div>
    );
  }
}
